<template>
  <div class="pageWrap">
    <div class="pageTableInner">
      <div class="tableContainer" style="top: 0px;">
        <div class="tableInner" ref="tableInner">
          <el-table
            ref="multipleTable"
            :data="rows"
            stripe
            :height="tableHeight"
            tooltip-effect="dark"
            style="width: 100%"
          >
            <el-table-column
              label="序号"
              prop="fileId"
              show-overflow-tooltip
            >
              <template slot-scope="scope">
                {{scope.$index+1}}

              </template>
            </el-table-column>
            <el-table-column
              label="文件名称"
              prop="fileName"
              width="350"
              show-overflow-tooltip>
              <template slot-scope="scope">
                {{getFileName(scope.row.fileName)}}


              </template>
            </el-table-column>
            <el-table-column
              label="更新时间"
              prop="updateTime"
            >
            </el-table-column>
            <el-table-column
              v-if="$store.state.btnMenuIds.indexOf(63)>-1"
              label="操作"
            >
              <template slot-scope="scope">
                <i  @click="downLoadXml(scope.row.fileName)" class="iconfont icon-xiazai"></i>
              </template>
            </el-table-column>
          </el-table>
        </div>
      </div>
    </div>
  </div>
</template>

<script>

  export default {
    props: [],
    data(){
      return {
        rows:[],
        tableHeight: 400,
      }
    },
    components: {},
    created(){
      this.getInfo()
    },
    mounted(){
      setTimeout(() => {
        //表格滚动
        this.tableHeight = document.querySelector(".pageWrap").clientHeight - 45
      },100)
    },
    methods: {
      //下载模板
      downLoadXml(downloadPath){
        window.location.href = downloadPath
      },
      //获取所有信息
      getInfo(){
        this.axios.post(process.env.API_HOST + `/examine/selectExamineFileList`,{})
          .then(response => {
            const result = response.data
            if (result.code == 200) {
              this.rows = result.result
            }
          })
      },

    },
  }
</script>

<style lang="stylus" rel="stylesheet/stylus">
  @import "../../../common/stylus/mixin.styl"
  .pageWrap
    page()


</style>
